/**
Company: Sarkar software technologys
WebSite: http://www.sarkar.cn
Author: yeganaaa
Date : 3/3/18
Time: 10:40 AM
 */

package Cn.Sarkar.Entities.Common

import Cn.Sarkar.EntityDream.CoreEngine.RDBMS.Core.Extensions.*

/**
 * جەدۋەل
 */
abstract class TableNoID(override var TableName: String = AutoDetect) : DBTable() {
    open val CreatedTime = dateTimeColumn("CreatedTime") notNull true comment "قۇرۇلغان ۋاقتى"
    open val DataVersion = longColumn("DataVersion") notNull true comment "سانلىق مەلۇمات نەشىرى"
    open val LastUpdatedTime = dateTimeColumn("LastUpdatedTime") notNull true comment "ئەڭ ئاخىرقى قىتىم يىڭىلانغان ۋاقىت"
    open val GUID = guidColumn("GUID") comment "guid"

    abstract val CATEGORY: Int

    init {
        index(CreatedTime)
        index(LastUpdatedTime)
        unique(GUID)
    }
}
